package com.surprise;

import weibo4j.Weibo;
import weibo4j.WeiboException;
import weibo4j.http.RequestToken;

public class WeiboHolder {
	
	private static Weibo weibo;
	
	private static RequestToken requestToken;
	
	public static void buildWeibo() {
		System.setProperty("weibo4j.oauth.consumerKey", Weibo.CONSUMER_KEY);
		System.setProperty("weibo4j.oauth.consumerSecret", Weibo.CONSUMER_SECRET);
		try {
			weibo = new Weibo();
			requestToken = weibo.getOAuthRequestToken("http://localhost/auth");
		} catch (WeiboException e) {
			e.printStackTrace();
		}
	}
	
	public static Weibo getWeibo() {
		return weibo;
	}
	
	public static RequestToken getRequestToken() {
		return requestToken;
	}
	
}
